package com.hd.trans.db.bean;

import androidx.annotation.IntDef;

import com.hd.trans.R;
import com.hd.trans.ui.base.AppContextProvider;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.CLASS)
@Target({ElementType.PARAMETER})
@IntDef(value = {
        TransitionType.UNKNOW,
        TransitionType.TEXT,
        TransitionType.VOICE,
        TransitionType.SIMULVOICE,
        TransitionType.PHOTO,
        TransitionType.DOCUMENT,
        TransitionType.AR,
        TransitionType.VIDEO,
        TransitionType.AUDIO,
        TransitionType.PHOTODAUB
})
public @interface TransitionType {

    int UNKNOW = 0;
    int TEXT = 1;// 文本翻译
    int VOICE = 2;// 语音翻译
    int SIMULVOICE = 3;// 同声传译
    int PHOTO = 4;// 拍照翻译
    int DOCUMENT = 5;// 文档翻译
    int AR = 6;// AR翻译
    int VIDEO = 7;// 导入视频翻译
    int AUDIO = 8;// 导入音频翻译
    int PHOTODAUB = 9;// 拍照涂抹翻译

    class TransitionName {
        public static String getName(int type) {
            return AppContextProvider.getContext().getResources().getStringArray(R.array.transition_type)[type];
        }
    }
}


